<template>
  <bo-form
    :model="form"
    :rules="[]"
  >
    <bo-form-item label="姓名：">
      <bo-input v-model="form.name"></bo-input>
    </bo-form-item>
    <bo-form-item label="手机号：">
      <bo-input v-model="form.phone"></bo-input>
    </bo-form-item>
    <bo-form-item label="邮箱：">
      <bo-input v-model="form.email"></bo-input>
    </bo-form-item>
    <button></button>
  </bo-form>
</template>

<script>
import { mapGetters, mapActions } from 'vuex';
import boForm from './bo-form/boForm.vue';
import boFormItem from './bo-form-item/boFormItem.vue';
import boInput from './bo-input/boInput.vue';

export default {
  name: 'boFromComponent',
  data() {
    return {
      form: {
        name: 312321,
        phone: '',
        email: ''
      },
      name: '',
      scrollToNum: 0
    };
  },
  computed: {
    ...mapGetters({
      userName: 'getUserName',
      scrollTo: 'getScrollTo'
    })
  },
  mounted() {
    this.form.name = 'dsad';
  },
  components: {
    boForm,
    boFormItem,
    boInput
  },
  methods: {
    ...mapActions(['setScrollTo', 'setUserName'])
  }
};
</script>
